package com.singer.piping.method;

import com.singer.druid.SingerIncrease;
import com.singer.piping.JdbcPiping;
import com.singer.software.SingerSoftware;

import java.util.Scanner;

public class Increase {
    static Scanner se=new Scanner(System.in);
    static JdbcPiping ser=new SingerIncrease();
    public void add1() throws Exception{
        System.out.println("====歌手添加界面====");
        System.out.println("1->歌手增添");
        System.out.println("2->裁判增添");
        int a=se.nextInt();
        switch (a){
            case 1:
                singer();
                return;
            case 2:
                judge();
        }
    }
    private static void singer() throws Exception{
        System.out.println("请输入歌手姓名:");
        String names=se.next();
        System.out.println("请输入歌手年龄:");
        int ages=se.nextInt();
        System.out.println("请输入歌手性别:");
        String sexs=se.next();
        System.out.println("请输入歌手演唱歌曲:");
        String songs=se.next();
        ser.add(names,ages,sexs,songs);
    }
    private static void judge()throws Exception{
        System.out.println("请输入裁判姓名:");
        String names=se.next();
        System.out.println("请输入裁判年龄:");
        int ages=se.nextInt();
        System.out.println("请输入裁判性别:");
        String sexs=se.next();
        ser.add1(names,ages,sexs);

    }
}
